<include file="Common:header"/>
<style>
  body{background-color: #ccc;}
  .home_guide_bd img{
      width:100%
  }
  .m-flex-item{display:block;}
</style>
<body>
<!-- 微信文章 -->
<div class="home_list home_list1" style="display: block;">

	<form id="myform" name="myform" method="post" >
	<div class="home_main">
		<div class="home_hd">
			<ul>
				<li onclick="f(1)" class="home_li1 on">微信文章</li>
				<li class="home_li2" onclick="action_url('<{:U('Home/Article/article_list_inside')}>')">
          <empty name="artice_name">文章库<else/><{$artice_name}></empty>
        </li>
			</ul>
		</div>
		<div class="home_bd">
			<div class="home_bd_text">
				<textarea class="home_text" name="file_put" id="url" placeholder="长按粘贴公众号文章链接在此处...请勿编辑/转发谣言、暴力、色情、辱骂等违规内容" value=""></textarea>
				<span class="home_how">如何粘贴？粘贴不了？</span>
			</div>
			<div class="home_bd_btn">
				<button type="button" class="fl bome_btn_clean">清空内容</button>
				<button type="button" class="fr bome_btn_open" onclick="jump(this)">打开</button>
			</div>
		</div>
	</div>
	</form>

  <div class="dvgo_scroll">
    <span class="fl dvgo_s1">
      <img src="__PUBLIC__/img/dvgo_s1.png">
    </span>
    <span class="fr dvgo_s3">
      <empty name="user_info['level']">
        <a href="<{:U('Home/User/upgrade')}>" class="v_redlink">付费成为正式会员</a>
       <else/>
        <a href="<{:U('Home/User/upgrade')}>" class="v_redlink">付费延长会员期限</a>
      </empty>
      <img src="__PUBLIC__/img/dvgo_s3.png">
    </span>
  
    <empty name="user_info['level']">
      <if condition="$judge_member">
        <span class="fl dvgo_s2 icon_mf">您当前是试用会员</span>
      <else/>
        <span class="fl dvgo_s2 icon_mf">您当前是普通会员</span>
      </if>
    <else/>
        <span class="fl dvgo_s2 icon_mf">您当前是<{$level_name}></span>
    </empty>

  </div>

  <div class="article-container">
    <div class="article-source">
      <div class="article-source-header">点击以下来源复制文章链接</div>
      <div class="article-source-body">
        <div class="m-flex">
          <a class="m-flex-item icon-source-1" href="http://weixin.sogou.com/">微 信</a>
          <a class="m-flex-item icon-source-2" href="http://m.toutiao.com/">今日头条</a>
          <a class="m-flex-item icon-source-6" href="http://xw.qq.com/m/news/">腾讯新闻</a>
          <a class="m-flex-item icon-source-3" href="http://inews.ifeng.com/">凤凰网</a>
        </div>
      </div>
    </div>
  </div>

	<div class="home_guide" style="margin-top:10px;">
		<div class="home_guide_hd">
      <a href="<{:U('Home/Index/manualList')}>" class="home_help">
        使用帮助&gt;&gt;
      </a>快速使用指南
    </div>
  </div>

  <if condition="!empty($notice['banner_picture_two'])">
    <div class="home_guide">
      <div class="banner" style="margin-top:10px;">
        <!-- <img src="__PUBLIC__/img/wx3.jpg" alt="这是banner"> -->
        <img src="<{$notice['banner_picture_two']}>" alt="这是banner" style="width:100%;">
      </div>
    </div>
  </if>

  <if condition="!empty($notice['notice_one'])">
    <div class="home_guide">
      <div class="home_guide_bd">
        <{$notice['notice_one']}>
      </div>
    </div>
  </if>

  <if condition="!empty($notice['notice_two'])">
    <div class="home_guide">
      <div class="home_guide_bd">
        <{$notice['notice_two']}>
      </div>
    </div>
  </if>

  <if condition="!empty($notice['notice_three'])">
      <div class="home_guide">
        <div class="home_guide_bd">
          <{$notice['notice_three']}>
        </div>
      </div>
  </if>

</div>

<!-- 如何粘贴 -->
<div class="fixedDiv howPaste" style="display: none; position: fixed; left: 50%; top: 50%; margin-top: -152px; margin-left: -150px;">
	<div class="howPaste_main">
		<div class="howPaste_tit">如何粘贴？</div>
		<div class="howPaste_info">打开公众号的文章，选择文章右上角的按钮“<span class="home_dian"></span>”，选择“复制链接”，回到首页进行粘贴。</div>
		<div class="howPaste_tit">粘贴不了？</div>
		<div class="howPaste_info">请检查文章的链接是否已经复制？是否是公众号的文章？</div>
	</div>
	<div class="howPaste_foot">
		我知道啦
	</div>
</div>

<!-- 遮罩层 -->
<div class="mask" id="mask" style="display: none;"></div>

<!-- 遮罩层 -->
<div class="mask_ewm" style="display: none;"></div>
<include file="Common:menu"/>
</body>
<script>

//关闭如何粘贴
$(".howPaste_foot").click(function(){
	$(".mask").hide();
	$(".howPaste").hide();
});

//打开如何粘贴
$('.home_how').click(function(){
  $(".mask").show();
	$(".howPaste").show();
});

//清空链接
$(".bome_btn_clean").click(function(){
	$("#url").val("");
})
function jump(obj){

  var level = "<{$level}>";
  var judge_member = "<{$judge_member}>";
  // if(level == '0' && !judge_member){
  //   layer.open({
  //             content:'非会员无权限使用该功能，请升级会员。',
  //         });
  //   return false;
  // }
  var url = $('#url').val();
  if (url == '')
  {
    layer.open({
              content:'链接不能为空',
          });
    return false;
  }
  //微信链接去掉#wechat_redirect,不然iphone会跳转链接
  var url_length = url.lastIndexOf('#wechat_redirect');

  if(url_length != -1 && url_length != ''){
    url = url.substring(0,url_length);
  }
    url = base64en(url);
    layer.open({type: 2,shadeClose: false});
	$.ajax({
	   type: "POST",
	   url: "<{:U('Article/insert_article_log')}>",
	   data: "url="+url+"",
	   success: function(msg){
      layer.closeAll();
			if(msg.error == '1'){
				layer.open({
					 content: msg.msg,
					 time:2
				});
			}else{
				window.location.href = "__MODULE__/Article/file_put/?article_id="+msg.article_id;
			}
	   }
	});
  
}
</script>
<script type="text/javascript">
/*导航li点击事件，跳转到文章库*/
function action_url(url){
  //创建一个A标签元素
  var el = document.createElement("a");

  //body追加一个A标签
  document.body.appendChild(el);

  //A标签链接
  el.href = url;

  //模拟点击事件来打开这个链接
  el.click();

  //删除A标签
  document.body.removeChild(el);
}
</script>
</html>
